package cc.catface.common.output;

public enum ErrorCode implements IBaseCode {

    SUCCESS("200", "success"),
    ERROR_INTERNAL("-100", "服务器内部错误"),
    ERROR_NULL("-101", "空指针错误"),
    ERROR_HTTP_MESSAGE_NOT_READABLE("-102", "请求参数错误"),
    ERROR_HTTP_REQUEST_METHOD_NOT_SUPPORTED("-103", "请求方法错误");

    private final String code;
    private final String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
